package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class MSPKG_TNMT_OUTMATCH_RPT extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const TNMT_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.MSPKG_TNMT_OUTMATCH_RPT.tnmt_id", "tnmtId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var tnmtId:UInt64;

		/**
		 *  @private
		 */
		public static const RANK:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.MSPKG_TNMT_OUTMATCH_RPT.rank", "rank", (2 << 3) | com.netease.protobuf.WireType.VARINT);

		private var rank$field:uint;

		private var hasField$0:uint = 0;

		public function clearRank():void {
			hasField$0 &= 0xfffffffe;
			rank$field = new uint();
		}

		public function get hasRank():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set rank(value:uint):void {
			hasField$0 |= 0x1;
			rank$field = value;
		}

		public function get rank():uint {
			return rank$field;
		}

		/**
		 *  @private
		 */
		public static const BONUS:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.MSPKG_TNMT_OUTMATCH_RPT.bonus", "bonus", (3 << 3) | com.netease.protobuf.WireType.VARINT);

		private var bonus$field:uint;

		public function clearBonus():void {
			hasField$0 &= 0xfffffffd;
			bonus$field = new uint();
		}

		public function get hasBonus():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set bonus(value:uint):void {
			hasField$0 |= 0x2;
			bonus$field = value;
		}

		public function get bonus():uint {
			return bonus$field;
		}

		/**
		 *  @private
		 */
		public static const TYPE:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.MSPKG_TNMT_OUTMATCH_RPT.type", "type", (4 << 3) | com.netease.protobuf.WireType.VARINT);

		private var type$field:uint;

		public function clearType():void {
			hasField$0 &= 0xfffffffb;
			type$field = new uint();
		}

		public function get hasType():Boolean {
			return (hasField$0 & 0x4) != 0;
		}

		public function set type(value:uint):void {
			hasField$0 |= 0x4;
			type$field = value;
		}

		public function get type():uint {
			return type$field;
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.tnmtId);
			if (hasRank) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 2);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, rank$field);
			}
			if (hasBonus) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, bonus$field);
			}
			if (hasType) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, type$field);
			}
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var tnmt_id$count:uint = 0;
			var rank$count:uint = 0;
			var bonus$count:uint = 0;
			var type$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (tnmt_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_TNMT_OUTMATCH_RPT.tnmtId cannot be set twice.');
					}
					++tnmt_id$count;
					this.tnmtId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 2:
					if (rank$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_TNMT_OUTMATCH_RPT.rank cannot be set twice.');
					}
					++rank$count;
					this.rank = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 3:
					if (bonus$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_TNMT_OUTMATCH_RPT.bonus cannot be set twice.');
					}
					++bonus$count;
					this.bonus = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 4:
					if (type$count != 0) {
						throw new flash.errors.IOError('Bad data format: MSPKG_TNMT_OUTMATCH_RPT.type cannot be set twice.');
					}
					++type$count;
					this.type = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
